home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 018a / what300.zip / SORTPICS.BAT next >
DOS Batch File  |  1991-04-30  |  818b  |  45 lines

  1. @echo off
  2. rem
  3. rem SORTPICS.BAT
  4. rem
  5. rem Sort your pics using WHAT?format!
  6. rem
  7. rem Change to a directory containing an
  8. rem assortment of graphics files in a
  9. rem variety of different formats, and give
  10. rem the command:
  11. rem
  12. rem    for %f in (*.*) do sortpics %f
  13. rem
  14. rem The files are copied to different
  15. rem directories depending on their format
  16. rem
  17. if not exist %1 goto :end
  18. what %1 /q
  19. if errorlevel 72 goto :end
  20. if errorlevel 71 goto :TIFF
  21. if errorlevel 70 goto :PCX
  22. if errorlevel 67 goto :end
  23. if errorlevel 66 goto :IMG
  24. if errorlevel 65 goto :end
  25. if errorlevel 64 goto :GIF
  26. goto :end
  27. :TIFF
  28. copy %1 c:\graphics\tiff
  29. del %1
  30. goto :end
  31. :PCX
  32. copy %1 c:\graphics\pcx
  33. del %1
  34. goto :end
  35. :IMG
  36. copy %1 c:\graphics\img
  37. del %1
  38. goto :end
  39. :GIF
  40. copy %1 c:\graphics\gif
  41. del %1
  42. goto :end
  43. :end
  44.  
  45.